
<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="utf-8">
  <title>Sign in &laquo; Admin</title>
  <link rel="stylesheet" href="css/bootstrap.css">
  <link rel="stylesheet" href="css/admin.css">
</head>
<body>
  <div class="login">
      <form class="login-wrap" action="islogin.php">
      <img class="avatar" src="images/default.png">
      <?php
      $error= isset($_GET['error'])?$_GET['error']:0;
      if($error==1)
      {
      ?>
       <div class="alert alert-danger">
        <strong>错误！</strong> 用户名错误！
      </div>
      <?php
      }
      if($error==2)
      {
      ?>
      <div class="alert alert-danger">
        <strong>错误！</strong> 密码错误！
      </div>
      <?php
      }
      ?>
     <!-- 有错误信息时展示 
     <div class="alert alert-danger">
        <strong>错误！</strong> 用户名或密码错误！
      </div>
     -->   
      
      <div class="form-group">
        <label for="email" class="sr-only">邮箱</label>
        <?php
        if(isset($_COOKIE['$email']))
            $email=$_COOKIE['email'];
        else 
            $email="";
        ?>
        <input id="email" type="email" class="form-control" placeholder="邮箱"  autofocus name="email"
               value="<?php echo $email;?>">
      </div>
      <div class="form-group">
        <label for="password" class="sr-only">密码</label>
        <input id="password" type="password" class="form-control" placeholder="密码" name="password">
      </div>     
      <input type="submit"  class="btn btn-primary btn-block" value="登 录"/>
    </form>
  </div>
</body>
</html>

